home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / rops1642.zip / ROPSBOOT._PS < prev    next >
Text File  |  1995-10-16  |  22KB  |  564 lines

  1. %!
  2. % RoPS Interpreter - ropsboot._ps
  3. % Copyright Roger Willcocks, 1993-1995
  4. % All Rights Reserved
  5. %
  6. % The RoPS interpreter is an implementation of the level 1 PostScript
  7. % programming language interpreter described in Adobe Systems' book,
  8. % the 'PostScript language reference manual'.  RoPS is not an Adobe
  9. % approved product.  The name 'PostScript' is a registered trademark of
  10. % Adobe Systems Incorporated.
  11. %
  12. % This file, which must be called 'ropsboot._ps', is read automatically
  13. % as RoPS starts up.  After the entire file has been consumed the 'start'
  14. % procedure (which is defined towards the end of this file) is executed.
  15. % Everything that's not an operator is described in this file and can be
  16. % customized.
  17. %
  18. % Version 4.02
  19.  
  20. /true where { pop (ropsboot is already loaded) print flush
  21.           currentfile closefile } if
  22.  
  23. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  24. % At this point there's a prototype 'systemdict' on the dictionary %
  25. % stack which contains an entry for each operator, and that's all. %
  26. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  27. %%Page: 1 1
  28.  
  29. /systemdict currentdict def
  30.  
  31. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  32. % put some dictionaries in systemdict %
  33. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  34.  
  35. /$error 20 dict def
  36. /errordict 100 dict def
  37. /userdict 500 dict def
  38. /FontDirectory 500 dict readonly def
  39. /serverdict 20 dict def
  40. /statusdict 80 dict def
  41.  
  42. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  43. % 'end' requires that there are at least three dictionaries     %
  44. % on the dictionary stack; juggle things so we can safely 'end' %
  45. % the dictionaries we are about to put in to systemdict.        %
  46. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  47.  
  48. userdict begin
  49. systemdict begin
  50.  
  51. /true 1 1 eq def
  52. /false true not def
  53.  
  54. /build$error {
  55.     $error begin
  56.         /newerror false def
  57.         /errorname null def
  58.         /command null def
  59.         % these will be sub-arrays of the space reserved below
  60.         /ostack [] def 
  61.         /estack [] def
  62.         /dstack [] def
  63.         $error /oreserve 500 array put
  64.         $error /ereserve 260 array put
  65.         $error /dreserve 25  array put
  66.     end % $error dictionary
  67. } def
  68.  
  69. /.error {   % in systemdict
  70. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  71. % following two lines report error as it occurs; not standard behaviour %
  72. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  73. %%      (error: ) print dup print (; ) print
  74. %%      (command: ) print exch dup =print exch (\n) print flush
  75.  
  76.     $error /newerror true put
  77.     $error exch /errorname exch put
  78.     $error exch /command exch put
  79.     count
  80.     $error /oreserve get exch
  81.     0 exch getinterval
  82.     astore
  83.     $error exch /ostack exch put
  84.     $error /dstack
  85.     $error /dreserve get dictstack 
  86.     put
  87.     $error /estack
  88.     $error /ereserve get execstack  
  89.     dup length 2 sub 0 exch getinterval
  90.     put
  91.     $error /ostack get
  92.     aload pop
  93.     stop
  94. } def
  95.  
  96. errordict begin
  97.  
  98. /handleerror {
  99.     $error /newerror get  % remember, dictionary stack may be full
  100.     {       
  101.         $error /newerror false put
  102. %%%%%           (%%[ Error: ) print
  103. %%%%%           $error /errorname get =print
  104. %%%%%           (; OffendingCommand: ) print
  105. %%%%%           $error /command get =print
  106. %%%%%           ( ]%%\n) print % flush
  107.  
  108.         $error /errorname get /interrupt ne {
  109.             $error /command get =print (: ) print
  110.             $error /errorname get =print
  111.             (\n\nA fault has been detected in this\n) print
  112.             (document and it has been closed) print
  113.         } if
  114.     } if
  115. } def
  116.  
  117. /dictfull           { (dictfull)           .error } def
  118. /dictstackoverflow  { (dictstackoverflow)  .error } def
  119. /dictstackunderflow { (dictstackunderflow) .error } def
  120. /execstackoverflow  { (execstackoverflow)  .error } def
  121. /invalidaccess      { (invalidaccess)      .error } def
  122. /invalidexit        { (invalidexit)        .error } def
  123. /invalidfileaccess  { (invalidfileaccess)  .error } def
  124. /invalidfont        { (invalidfont)        .error } def
  125. /invalidrestore     { (invalidrestore)     .error } def
  126. /ioerror            { (ioerror)            .error } def
  127. /limitcheck         { (limitcheck)         .error } def
  128. /nocurrentpoint     { (nocurrentpoint)     .error } def
  129. /rangecheck         { (rangecheck)         .error } def
  130. /stackoverflow      { (stackoverflow)      .error } def
  131. /stackunderflow     { (stackunderflow)     .error } def
  132. /syntaxerror        { (syntaxerror)        .error } def
  133. /timeout            { (timeout)            .error } def
  134. /typecheck          { (typecheck)          .error } def
  135. /undefined          { (undefined)          .error } def
  136. /undefinedfilename  { (undefinedfilename)  .error } def
  137. /undefinedresult    { (undefinedresult)    .error } def
  138. /unmatchedmark      { (unmatchedmark)      .error } def
  139. /unregistered       { (unregistered)       .error } def
  140. /VMerror {
  141.     $error /newerror true put
  142.     $error /errorname (VMerror) put
  143.     $error exch /command exch put
  144.     stop
  145. } def
  146. /interrupt          { (interrupt)          .error } def  % ctrl-C
  147.  
  148. end % errordict
  149.  
  150. serverdict begin
  151.  
  152. /exitservercalled false def
  153.  
  154. /statusmsg { (%%[ ) print print ( ]%%\n) print flush } def
  155.  
  156. /exitserver 
  157.     pop
  158.     $error /newerror false put
  159.     serverdict /exitservercalled true put
  160.     stop
  161. } def
  162.  
  163.  
  164. /execjob
  165. {
  166.     { (%stdin) (r) file cvx exec } stopped
  167.     { 
  168.         $error /newerror get {
  169.         { handleerror } stopped pop % catch errors in handler
  170. %%              (Flushing: rest of job (to end-of-file) will be ignored)
  171. %%                      serverdict /statusmsg get exec
  172.             (%stdin) (r) file flushfile
  173.         } if % newerror
  174.     } if % stopped
  175.     flush clear
  176.     countdictstack 2 sub { end } repeat
  177. } def
  178.  
  179.  
  180. end % serverdict
  181. % still putting things into systemdict
  182.  
  183. /handleerror { systemdict /errordict get /handleerror get exec } bind def
  184.  
  185. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  186. % compatibility definitions %
  187. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  188.  
  189. statusdict begin
  190.     /setjobtimeout {} def
  191.     /product (RoPS) def
  192. end
  193.  
  194. % temporary, to allow FrameMaker spot colours
  195. /currentcolortransfer { currenttransfer dup dup dup } def
  196.  
  197. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  198. % default halftone screen; 20 lines per inch (on a 100 lpi printer) %
  199. % at an angle of 57 degrees.  Circular dots becoming square at 50%  %
  200. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  201. /ScreenFreq 20 def
  202. /ScreenAngle 57 def
  203. /LPI 100 def
  204. /WidthMM 210 def
  205. /DepthMM 297 def
  206.  
  207. (framebuffer) getprofile { { cvx exec def } forall } if % maybe override
  208.  
  209. ScreenFreq ScreenAngle
  210. { abs exch abs 2 copy add 1 gt
  211.     { 1 sub dup mul exch 1 sub dup mul add 1 sub }
  212.     { dup mul exch dup mul add 1 exch sub }
  213. ifelse } setscreen
  214.  
  215. end % systemdict
  216. systemdict readonly pop
  217.  
  218. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  219. % finished with systemdict; userdict is waiting on the stack ... %
  220. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  221.  
  222. /StandardEncoding
  223. [
  224.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  225.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  226.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  227.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  228.     /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl
  229.     /numbersign /dollar /percent /ampersand /quoteright /parenleft
  230.     /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
  231.     /two /three /four /five /six /seven /eight /nine /colon /semicolon
  232.     /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K
  233.     /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash
  234.     /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g
  235.     /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft
  236.     /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef
  237.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  238.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  239.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  240.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  241.     /.notdef /space /exclamdown /cent /sterling /fraction /yen /florin
  242.     /section /currency /quotesingle /quotedblleft /guillemotleft
  243.     /guilsinglleft /guilsinglright /fi /fl /.notdef /endash /dagger
  244.     /daggerdbl /periodcentered /.notdef /paragraph /bullet /quotesinglbase
  245.     /quotedblbase /quotedblright /guillemotright /ellipsis /perthousand
  246.     /.notdef /questiondown /.notdef /grave /acute /circumflex /tilde
  247.     /macron /breve /dotaccent /dieresis /.notdef /degree /cedilla /.notdef
  248.     /hungarumlaut /ogonek /caron /emdash /.notdef /.notdef /.notdef
  249.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  250.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /AE /.notdef
  251.     /ordfeminine /.notdef /.notdef /.notdef /.notdef /Lslash /Oslash /OE
  252.     /ordmasculine /.notdef /.notdef /.notdef /.notdef /.notdef /ae
  253.     /.notdef /.notdef /.notdef /dotlessi /.notdef /.notdef /lslash /oslash
  254.     /oe /germandbls /.notdef /.notdef /.notdef /.notdef
  255. ] def
  256.  
  257. /ISOLatin1Encoding
  258. [
  259.     /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis
  260.     /ring /cedilla /hungarumlaut /ogonek /caron /dotlessi /fi /fl /Lslash
  261.     /lslash /Zcaron /zcaron /minus /.notdef /.notdef /.notdef /.notdef
  262.     /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space
  263.     /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle
  264.     /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
  265.     /zero /one /two /three /four /five /six /seven /eight /nine /colon
  266.     /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H
  267.     /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft
  268.     /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d
  269.     /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z
  270.     /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
  271.     /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl
  272.     /circumflex /perthousand /Scaron /guilsinglleft /OE /.notdef /.notdef
  273.     /.notdef /.notdef /quoteleft /quoteright /quotedblleft /quotedblright
  274.     /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe
  275.     /.notdef /.notdef /Ydieresis /.notdef /exclamdown /cent /sterling
  276.     /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine
  277.     /guillemotleft /logicalnot /hyphen /registered /macron /degree
  278.     /plusminus /twosuperior /threesuperior /acute /mu /paragraph
  279.     /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright
  280.     /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute
  281.     /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute
  282.     /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth
  283.     /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply
  284.     /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn
  285.     /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae
  286.     /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute
  287.     /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex
  288.     /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex
  289.     /udieresis /yacute /thorn /ydieresis
  290. ] def
  291.  
  292. /findfont {
  293.     dup FontDirectory exch known not {
  294.         (findfont: can't find ) print dup =print
  295.         (; using Courier) print flush
  296.         dup CourierFont ttmap
  297.     } if
  298.     FontDirectory exch get
  299. } bind def
  300.  
  301. /=string 140 string def
  302.  
  303. /=print { =string cvs print } bind def
  304.  
  305. /= { =print (\n) print } bind def
  306.  
  307. /==dict 20 dict def
  308.  
  309. ==dict begin
  310.     /=qc {  /str ( x) def         % quote a character
  311.         str exch 0 exch put
  312.         (\nx\\n\rx\\r\tx\\t\bx\\b\fx\\f\(x\\\(\)x\\\)\\x\\\\)
  313.         str search
  314.         { pop pop 0 2 getinterval }
  315.         { pop str 0 1 getinterval } ifelse print
  316.     } bind def
  317.  
  318.     /indent { 1 1 depth { pop (\t) print } for } def
  319.  
  320.     /expand {
  321.         indent dup type exec print
  322.         (\n) print
  323.     } bind def
  324.     /arraytype {
  325.         dup xcheck { ({\n) } { ([\n) } ifelse print
  326.         /depth depth 1 add def
  327.         dup rcheck { dup {expand} forall }
  328.         { indent (???\n) print } ifelse
  329.         /depth depth 1 sub def
  330.         indent xcheck { (}) } { (]) } ifelse
  331.     } bind def
  332.     /booleantype { { (true) } { (false) } ifelse } bind def
  333.     /dicttype { dup length =print ( ) print maxlength =print
  334.                 ( ) print (-dicttype-) } bind def
  335.     /filetype { pop (-filetype-) } bind def
  336.     /fonttype { pop (-fonttype-) } bind def
  337.     /integertype { =string cvs } bind def
  338.     /marktype { pop (-marktype-) } bind def
  339.     /nametype { dup xcheck not { (/) print } if =string cvs } bind def
  340.     /nulltype { pop (-nulltype-) } bind def
  341.     /operatortype { (--) print =string cvs print (--) } bind def
  342.     /realtype { =string cvs } bind def
  343.     /savetype { pop (-savetype-) } bind def
  344.     /stringtype { dup rcheck { (\() print {=qc} forall (\)) }
  345.               { pop (\(???\)) } ifelse } bind def
  346.  
  347.     /depth 0 def
  348. end
  349.  
  350. /== {
  351.     ==dict begin
  352.     expand
  353.     end
  354. } bind def
  355.  
  356. /stack { count dup 1 add copy { = } repeat pop } bind def
  357. /pstack { count dup 1 add copy { == } repeat pop } bind def
  358. /\004 {} def % ignore ^D in input file
  359.  
  360. /server
  361. {
  362.     {
  363.         (%stdin) (r) file status not { exit } if
  364.  
  365.         serverdict /serversave save put
  366.         % has to be done inside save context, since writing
  367.         % to a saved array uses VM, and it could be vmerror
  368.         build$error
  369.         serverdict /execjob get exec
  370.         serverdict /exitservercalled get
  371.         serverdict /serversave get restore
  372.         {
  373.             (exitserver : permanent state may be changed)
  374.             serverdict /statusmsg get exec
  375.             serverdict /execjob get exec
  376.  
  377.         } if % exitservercalled
  378.     } loop
  379. } bind def
  380.  
  381. /quit  { stop } bind def
  382. /start { server } bind def
  383.  
  384. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  385. % userdict is still on stack; system/user specific stuff starts here %
  386. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  387.  
  388. %%%%%%%%%%%%%%%%%%%%%%%%%
  389. % create a frame buffer %
  390. %%%%%%%%%%%%%%%%%%%%%%%%%
  391.  
  392. /pixelwidth WidthMM 25.4 div LPI mul cvi def
  393. /pixeldepth DepthMM 25.4 div LPI mul cvi def
  394. /framescale LPI 72 div def
  395.  
  396. [ framescale 0 0 framescale 0 0 ]
  397. pixelwidth pixeldepth {} framedevice  % create frame device (proc unused)
  398.  
  399. /TT_ANSI_CharStrings 330 dict dup  % map character name to font entry
  400. begin
  401.  
  402. /space 32 def /exclam 33 def /quotedbl 34 def /numbersign 35 def
  403. /dollar 36 def /percent 37 def /ampersand 38 def /quotesingle 39 def
  404. /parenleft 40 def /parenright 41 def /asterisk 42 def /plus 43 def
  405. /comma 44 def /hyphen 45 def /period 46 def /slash 47 def /zero 48 def
  406. /one 49 def /two 50 def /three 51 def /four 52 def /five 53 def /six
  407. 54 def /seven 55 def /eight 56 def /nine 57 def /colon 58 def
  408. /semicolon 59 def /less 60 def /equal 61 def /greater 62 def /question
  409. 63 def /at 64 def /A 65 def /B 66 def /C 67 def /D 68 def /E 69 def /F
  410. 70 def /G 71 def /H 72 def /I 73 def /J 74 def /K 75 def /L 76 def /M
  411. 77 def /N 78 def /O 79 def /P 80 def /Q 81 def /R 82 def /S 83 def /T
  412. 84 def /U 85 def /V 86 def /W 87 def /X 88 def /Y 89 def /Z 90 def
  413. /bracketleft 91 def /backslash 92 def /bracketright 93 def
  414. /asciicircum 94 def /underscore 95 def /grave 96 def /a 97 def /b 98
  415. def /c 99 def /d 100 def /e 101 def /f 102 def /g 103 def /h 104 def
  416. /i 105 def /j 106 def /k 107 def /l 108 def /m 109 def /n 110 def /o
  417. 111 def /p 112 def /q 113 def /r 114 def /s 115 def /t 116 def /u 117
  418. def /v 118 def /w 119 def /x 120 def /y 121 def /z 122 def /braceleft
  419. 123 def /bar 124 def /braceright 125 def /asciitilde 126 def /.notdef
  420. 127 def /nbspace 160 def /exclamdown 161 def /cent 162 def /sterling
  421. 163 def /currency 164 def /yen 165 def /brokenbar 166 def /section 167
  422. def /dieresis 168 def /copyright 169 def /ordfeminine 170 def
  423. /guillemotleft 171 def /logicalnot 172 def /sfthyphen 173 def
  424. /registered 174 def /macron 175 def /degree 176 def /plusminus 177 def
  425. /twosuperior 178 def /threesuperior 179 def /acute 180 def /mu 181 def
  426. /paragraph 182 def /periodcentered 183 def /cedilla 184 def
  427. /onesuperior 185 def /ordmasculine 186 def /guillemotright 187 def
  428. /onequarter 188 def /onehalf 189 def /threequarters 190 def
  429. /questiondown 191 def /Agrave 192 def /Aacute 193 def /Acircumflex 194
  430. def /Atilde 195 def /Adieresis 196 def /Aring 197 def /AE 198 def
  431. /Ccedilla 199 def /Egrave 200 def /Eacute 201 def /Ecircumflex 202 def
  432. /Edieresis 203 def /Igrave 204 def /Iacute 205 def /Icircumflex 206
  433. def /Idieresis 207 def /Eth 208 def /Ntilde 209 def /Ograve 210 def
  434. /Oacute 211 def /Ocircumflex 212 def /Otilde 213 def /Odieresis 214
  435. def /multiply 215 def /Oslash 216 def /Ugrave 217 def /Uacute 218 def
  436. /Ucircumflex 219 def /Udieresis 220 def /Yacute 221 def /Thorn 222 def
  437. /germandbls 223 def /agrave 224 def /aacute 225 def /acircumflex 226
  438. def /atilde 227 def /adieresis 228 def /aring 229 def /ae 230 def
  439. /ccedilla 231 def /egrave 232 def /eacute 233 def /ecircumflex 234 def
  440. /edieresis 235 def /igrave 236 def /iacute 237 def /icircumflex 238
  441. def /idieresis 239 def /eth 240 def /ntilde 241 def /ograve 242 def
  442. /oacute 243 def /ocircumflex 244 def /otilde 245 def /odieresis 246
  443. def /divide 247 def /oslash 248 def /ugrave 249 def /uacute 250 def
  444. /ucircumflex 251 def /udieresis 252 def /yacute 253 def /thorn 254 def
  445. /ydieresis 255 def /fi 16#690066 def /fl 16#6c0066 def
  446.  
  447. unicode {
  448.   % Unicode encoding (NT)
  449.     /overstore 175 def /middot 183 def
  450.     /Abreve 16#102 def /abreve 16#103 def /Aogonek 16#104 def /aogonek
  451.     16#105 def /Cacute 16#106 def /cacute 16#107 def /Ccaron 16#10c def
  452.     /ccaron 16#10d def /Dcaron 16#10e def /dcaron 16#10f def /Dslash
  453.     16#110 def /dmacron 16#111 def /dslash 16#111 def /Eogonek 16#118 def
  454.     /eogonek 16#119 def /Ecaron 16#11a def /ecaron 16#11b def /Gbreve
  455.     16#11e def /gbreve 16#11f def /Idot 16#130 def /dotlessi 16#131 def
  456.     /Lacute 16#139 def /lacute 16#13a def /Lcaron 16#13d def /lcaron
  457.     16#13e def /Ldot 16#13f def /ldot 16#140 def /Lslash 16#141 def
  458.     /lslash 16#142 def /Nacute 16#143 def /nacute 16#144 def /Ncaron
  459.     16#147 def /ncaron 16#148 def /Odblacute 16#150 def /odblacute 16#151
  460.     def /OE 16#152 def /oe 16#153 def /Racute 16#154 def /racute 16#155
  461.     def /Rcaron 16#158 def /rcaron 16#159 def /Sacute 16#15a def /sacute
  462.     16#15b def /Scedilla 16#15e def /scedilla 16#15f def /Scaron 16#160
  463.     def /scaron 16#161 def /Tcedilla 16#162 def /tcedilla 16#163 def
  464.     /Tcaron 16#164 def /tcaron 16#165 def /Uring 16#16e def /uring 16#16f
  465.     def /Udblqcute 16#170 def /udblacute 16#171 def /Ydieresis 16#178 def
  466.     /Zacute 16#179 def /zacute 16#17a def /Zdot 16#17b def /zdot 16#17c
  467.     def /Zcaron 16#17d def /zcaron 16#17e def /florin 16#192 def
  468.     /hungarumlaut 16#2dd def /caron 16#2c7 def /macron 16#2c9 def /breve
  469.     16#2d8 def /dotaccent 16#2d9 def /ring 16#2da def /ogonek 16#2db def
  470.     /circumflex 16#2c6 def /tilde 16#2dc def /Gamma 16#393 def /Theta
  471.     16#398 def /Phi 16#3a6 def /alpha 16#3b1 def /delta 16#3b4 def
  472.     /epsilon 16#3b5 def /pi 16#3c0 def /sigma 16#3c3 def /tau 16#3c4 def
  473.     /phi 16#3c6 def /endash 16#2013 def /emdash 16#2014 def /underscoredbl
  474.     16#2017 def /quoteleft 16#2018 def /quoteright 16#2019 def
  475.     /quotesinglbase 16#201a def /quotedblleft 16#201c def /quotedblright
  476.     16#201d def /quotedblbase 16#201e def /dagger 16#2020 def /daggerdbl
  477.     16#2021 def /bullet 16#2022 def /ellipsis 16#2026 def /perthousand
  478.     16#2030 def /guilsinglleft 16#2039 def /guilsinglright 16#203a def
  479.     /exclamdbl 16#203c def /nsuperior 16#207f def /franc 16#20a3 def
  480.     /peseta 16#20a7 def /trademark 16#2122 def /arrowleft 16#2190 def
  481.     /arrowup 16#2191 def /arrowright 16#2192 def /arrowdown 16#2193 def
  482.     /arrowboth 16#2194 def /arrowupdn 16#2195 def /arrowupdnbse 16#21a8
  483.     def /ohm 16#2126 def /partialdiff 16#2202 def /Delta 16#2206 def
  484.     /product 16#220f def /summation 16#2211 def /Sigma 16#2211 def /minus
  485.     16#2212 def /fraction 16#2215 def /periodcentered 16#2219 def /radical
  486.     16#221a def /infinity 16#221e def /orthogonal 16#221f def
  487.     /intersection 16#2229 def /integral 16#222b def /approxequal 16#2248
  488.     def /notequal 16#2260 def /equivalence 16#2261 def /lessequal 16#2264
  489.     def /greaterequal 16#2265 def /house 16#2302 def /revlogicalnot
  490.     16#2310 def /integraltp 16#2320 def /integralbt 16#2321 def
  491. } {
  492.   % Windows encoding
  493.   /quotesinglbase 130 def /florin 131 def /quotedblbase 132 def
  494.   /ellipsis 133 def /dagger 134 def /daggerdbl 135 def /circumflex 136
  495.   def /perthousand 137 def /Scaron 138 def /guilsinglleft 139 def /OE
  496.   140 def /quoteleft 145 def /quoteright 146 def /quotedblleft 147 def
  497.   /quotedblright 148 def /bullet 149 def /endash 150 def /emdash 151 def
  498.   /tilde 152 def /trademark 153 def /scaron 154 def /guilsinglright 155
  499.   def /oe 156 def /Ydieresis 159 def
  500. } ifelse % unicode
  501.  
  502. end def
  503.  
  504. /TT_BuildChar {
  505.     exch begin
  506.     TTName (Symbol) eq {
  507.       unicode { 16#8000 add } if
  508.     }
  509.     {
  510.       Encoding exch get
  511.       dup CharStrings exch known not
  512.       { pop (.notdef) } if
  513.       CharStrings exch get
  514.     } ifelse
  515.     end
  516.     ttchar
  517. } def
  518.  
  519. /TT_FontInfo 2 dict dup begin
  520.     /UnderlinePosition -0.1 def
  521.     /UnderlineThickness 0.1 def
  522.     end def
  523.  
  524. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  525. % This function associates PostScript font names with Windows TrueType %
  526. % fonts.  The RoPS interpreter uses the Windows rendering routines to  %
  527. % paint the TrueType characters.                                       %
  528. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  529.  
  530. /ttmap {
  531.     11 dict dup begin
  532.     exch /TTName exch def
  533.     exch /FontName exch def
  534.     /Metrics 0 dict def
  535.     /FontMatrix [ 1.0 0.0 0.0 1.0 0.0 0.0 ] readonly def
  536.     /FontType 3 def
  537.     /Encoding StandardEncoding def
  538.     /FontBBox { 0 0 0 0 } readonly def
  539.     /CharStrings TT_ANSI_CharStrings def
  540.     /BuildChar /TT_BuildChar load def
  541.     /FontInfo TT_FontInfo def
  542.     FontName end
  543.     exch definefont pop
  544. } def
  545.  
  546. (fontlist) getprofile { { ttmap } forall } if
  547. (fontalias) getprofile { { ttmap } forall } if
  548. /CourierFont FontDirectory /Courier get /TTName get def
  549.  
  550. %%%%%%%%%%%
  551. % hackery %
  552. %%%%%%%%%%%
  553.  
  554. /lettertray {} def
  555. /letter {} def
  556. /a4tray {} def
  557. /a4 {} def
  558.  
  559. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  560. % when we fall off the end of this file, 'start' will be executed %
  561. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  562. % --- end ---
  563.